<template>
   <div class="teacher">
    <table>
  <thead>
    <tr>
      <th>申请人序号</th>
      <th>申请人id</th>
      <th>开课主体</th>
      <th>作品链接</th>
      <th>联系方式</th>
      <th>信息</th>
      <th>管理</th>
    </tr>
  </thead>
  <tbody>
    <tr v-for="(el,index) in tid" :key="tid">
      <td>{{tid[index]}}</td>
      <td>{{uid[index]}}</td>
      <td>{{coursetpye[index]}}</td>
      <td>{{lianjie[index]}}</td>
      <td>{{Contact[index]}}</td>
      <td>{{Information[index]}}</td>
      <td>
      <button @click="add()">通过</button>
      <button @click="del()">拒绝</button>
      </td>
    </tr>
  </tbody>
    </table>
  </div>
  
</template>

<script>
import axios from "axios";
export default {
data() {
  return {
    tid:[1,2,3,4,5,6],
    uid:[],
    coursetpye:[],
    lianjie:[],
    Contact:[],
    Information:[]
  }
},
beforeMount() {
   axios.get("egg/get_teacher").then((response) => {
  let newtid = response.data.map((obj) => obj.tid);
  let newuid = response.data.map((obj) => obj.uid);
  let newcoursetpye = response.data.map((obj) => obj.coursetpye);
  let newlianjie = response.data.map((obj) => obj.lianjie);
  let newContact = response.data.map((obj) => obj.Contact);
  let newInformation = response.data.map((obj) => obj.Information);
  this.tid=newtid
  this.uid=newuid
  this.coursetpye=newcoursetpye
  this.lianjie=newlianjie
  this.Contact=newContact
  this.Information=newInformation
  console.log(this.couersetpye);
   }).catch((error) => {
console.log(error);
      });
}
}
</script>

<style>
.teacher{
  width: 1090px;
  height: 685px;
  background-color:pink;
}
table{
  width: 1090px;
  height: 685px;
  border: 1px solid black;
  text-align: center;
}

</style>